home *** CD-ROM | disk | FTP | other *** search
/ MacPeople 1998 #2 / MACPEOPLE-1998-NO2.ISO / アップル関連 / ARA PS アップデート / モデム用追加分 / OMRON ME1414B3⁄VB3 ARA2 / OMRON ME1414B3_VB3 ARA2 next >
Text File  |  1995-11-22  |  12KB  |  604 lines

  1. !**************************************************************************
  2. !    OMRON ME1414B3/VB3  ARA Ver2.0 JAPAN
  3. !    1995/11/22 Ver1.0
  4. !    Written by OMRON Corp 
  5. !
  6. !  'mlts' resource info for this modem:
  7. !    byte 1 == 01 -> modem HAS builtin reliability protocols
  8. !    byte 2 == 00 -> reserved by Apple
  9. !    byte 3 == 23 -> max hex chars in varstr 7 (35 dec)
  10. !    byte 4 == 23 -> max hex chars in varstr 8
  11. !    byte 5 == 23 -> max hex chars in varstr 9
  12. !    
  13. !**************************************************************************
  14. @ORIGINATE
  15. @ANSWER
  16. !------------------------
  17. ! reset the serial port
  18. !------------------------
  19. HSReset 0 0 0 0 0 0  
  20. @LABEL 1
  21. DTRClear
  22. pause 10
  23. DTRSet
  24. pause 3
  25. ! Mac talks to the modem at 14.400 bps.
  26. serreset 19200, 0, 8, 1
  27. setspeed 14400
  28. matchclr
  29. settries 0
  30. ! Modem initialize ATZ
  31. @LABEL 2
  32. matchclr
  33. matchstr 1 3 "OK¥13¥10"
  34. matchstr 2 3 "0¥13"
  35. write "ATZ¥13"
  36. matchread 15
  37. inctries
  38. iftries 3 3
  39. jump 2
  40. ! Modem Setting
  41. ! E0  - Command Echo Off
  42. ! Q0  - Command Response On
  43. ! V1  - Command Response Format Word
  44. ! M1  - Speaker moniter on until carrier detected <--- 1995/3/8
  45. ! &C1 - Carrier Signal Detect Carrier from the remote modem 
  46. ! &D2 - Data Terminal Ready Control On to Off on-hook
  47. ! &S1 - Activates DSR before handshaking
  48. ! ¥J0 - DTE Speed Setting 19200bps
  49. ! ¥V2 - Result Error Corection Type
  50. ! ¥N0 - Error Colection MNP-Off
  51. ! &M0 - Error Colection V.42-Off
  52. ! ¥Q3 - CTS Hardware flow Control
  53. ! S0=0 - Don't answer calls
  54. @LABEL 3
  55. matchclr
  56. matchstr 1 4 "OK¥13¥10"
  57. pause 2
  58. write "ATE0Q0V1M1&C1&D2&S1X4¥¥J0¥¥V2¥¥N0&M0¥¥Q3&E2S0=0¥13"
  59. matchread 15
  60. inctries
  61. iftries 3 81
  62. jump 3
  63. !-----------------------------------------
  64. ! Modem responding & configured.
  65. ! determine if reliable link is requested.
  66. !-----------------------------------------
  67. @LABEL 4
  68. ! if modem mnp10 link requested (var 4 == 2) then jump label 5
  69. ifstr 4 5 "2"
  70. !
  71. ! if modem v42 link requested (var 4 == 1) then jump label 6
  72. ifstr 4 6 "1"
  73. !
  74. ! if no modem v42 link requested (var 4 == 0) [same as ARA 1.0] then jump label 8
  75. ifstr 4 8 "0"
  76. !
  77. ! else invalid value in var 4; exit w/error
  78. jump 86
  79. !--------------------------------
  80. ! MNP10 Link Setting.
  81. !--------------------------------
  82. @LABEL 5
  83. matchclr
  84. matchstr 1 7 "OK¥13¥10"
  85. ! &M0 - V.42-Off
  86. ! ¥N3 - MNP-On
  87. ! ¥X0 - MNP10-On
  88. ! %C0 - DATACOMP-Off
  89. pause 2
  90. !write "AT&M0¥¥N3%C0¥13" <--- not MNP10 1995/3/8
  91. write "AT&M0¥¥N3¥¥X0%C0¥13"
  92. matchread 15
  93. inctries
  94. iftries 3 81
  95. jump 5
  96. !-----------------------------------------------------
  97. ! V.42bis Link Setting V.42bis --> MNP5 --> Normal
  98. !-----------------------------------------------------
  99. @LABEL 6
  100. matchclr
  101. matchstr 1 7 "OK¥13¥10"
  102. ! &M5 - v42 autoreliable mode
  103. pause 2
  104. write "AT¥¥N3&M5%C0¥13"
  105. matchread 15
  106. inctries
  107. iftries 3 81
  108. jump 6
  109. !------------------------------------------------------------------------
  110. ! If we DID support compression in the modem, this is where it would go.
  111. !------------------------------------------------------------------------
  112. @LABEL 7
  113. !
  114. !
  115. !
  116. !------------------------------------------------------------------------
  117. ! Set ID OMRON MD1414B3/VB3.
  118. !------------------------------------------------------------------------
  119. @LABEL 8
  120. matchclr
  121. matchstr 1 9 "248¥13¥10¥13¥10OK¥13¥10"
  122. pause 2
  123. write "ATI0¥13"
  124. matchread 15
  125. inctries
  126. iftries 3 81
  127. jump 8
  128. !--------------------------------------------------------------------------
  129. ! If speaker on flag is true, jump to label 13.  Else turn off the speaker.
  130. !--------------------------------------------------------------------------
  131. @LABEL 9
  132. ifstr 2 13 "1"
  133. pause 5
  134. matchclr
  135. matchstr 1 13 "OK¥13¥10"
  136. pause 2
  137. write "ATM0¥13"
  138. matchread 15
  139. jump 81
  140. !*******************************************************************************
  141. ! modem ready, so enable answering or originate a call - label range is 11-30
  142. !
  143. !
  144. !*******************************************************************************
  145. @LABEL 13
  146. pause 5
  147. ifANSWER 71
  148. !
  149. ! if normal dialing (parm 6 == 0) jump to 19
  150. ifstr 6 19 "0"
  151. !
  152. ! if blind dialing (parm 6 == 1) jump to 17
  153. ifstr 6 17 "1"
  154. !
  155. ! if manual dialing (parm 6 == 2) jump to 15 
  156. ifstr 6 15 "2"
  157. !
  158. ! else invalid value in var 6; exit w/error
  159. jump 86
  160. !
  161. !
  162. !
  163. @label 15
  164. note "手動で発信をしています。" 3
  165. ! X1 to ignore dialtone & busy for manual dialing, D to dial
  166. write "ATX1D ¥13"
  167. jump 32
  168. !
  169. !
  170. !
  171. @label 17
  172. matchclr
  173. matchstr 1 19 "OK¥13¥10"
  174. ! X3 to ignore dialtone for blind dialing
  175. pause 2
  176. write "ATX3¥13"
  177. matchread 30
  178. jump 81
  179. !
  180. !
  181. !
  182. @label 19
  183. ! this is where we break up long dialstrings
  184. !
  185. ! parm 1 is always the full dialstring from the conn doc
  186. !note "Dialing ^1" 3
  187. note "^1に電話をしています。" 3
  188. ! parm 3 is always "p" for pulse & "t" for tone
  189. !
  190. ! if parm 8 == blank (complete dialstring in parm 7)
  191. !  then jump to label 27 & dial parm 7
  192. ifstr 8 27 " "
  193. !
  194. ! if parm 9 == blank (complete dialstring in parms 7 & 8)
  195. !  then jump to label 24 & dial parm 7 & 8
  196. ifstr 9 24 " "
  197. !
  198. !  else dial parm 7 & 8 & 9 (complete dialstring in parms 7, 8 & 9)
  199. matchclr
  200. matchstr 1 21 "OK¥13¥10"
  201. ! parm 7 holds first string fragment
  202. write "ATD^3^7;¥13"
  203. matchread 400
  204. ! modem not responding; bailout.
  205. jump 81
  206. !
  207. !
  208. !
  209. @label 21
  210. ! parm 8 holds second string fragment
  211. matchclr
  212. matchstr 1 22 "OK¥13¥10"
  213. write "ATD^3^8;¥13"
  214. matchread 400
  215. ! modem not responding; bailout.
  216. jump 81
  217. !
  218. !
  219. !
  220. @label 22
  221. ! parm 9 holds last string fragment
  222. write "ATD^3^9¥13"
  223. jump 32
  224. !
  225. !
  226. !
  227. !
  228. @label 24
  229. matchclr
  230. matchstr 1 25 "OK¥13¥10"
  231. ! parm 7 holds first string fragment
  232. write "ATD^3^7;¥13"
  233. matchread 400
  234. ! modem not responding; bailout.
  235. jump 81
  236. !
  237. !
  238. !
  239. @label 25
  240. ! parm 8 holds last string fragment
  241. write "ATD^3^8¥13"
  242. jump 32
  243. !
  244. !
  245. !
  246. @label 27
  247. ! parm 7 holds entire string
  248. write "ATD^3^7¥13"
  249. jump 32
  250. !***********************************************
  251. !    connecting - label range is 34-60
  252. !
  253. !
  254. !***********************************************
  255. @LABEL 32
  256. matchclr
  257. !
  258. matchstr 1  34 "CONNECT 1200¥13¥10"
  259. matchstr 2  35 "CONNECT 1200/REL3¥13¥10"
  260. matchstr 3  35 "CONNECT 1200/REL4¥13¥10"
  261. matchstr 4  36 "CONNECT 1200/REL4-10¥13¥10"
  262. matchstr 5  37 "CONNECT 1200/LAPM¥13¥10"
  263. !
  264. matchstr 6  38 "CONNECT 2400¥13¥10"
  265. matchstr 7  39 "CONNECT 2400/REL3¥13¥10"
  266. matchstr 8  39 "CONNECT 2400/REL4¥13¥10"
  267. matchstr 9  40 "CONNECT 2400/REL4-10¥13¥10"
  268. matchstr 10 41 "CONNECT 2400/LAPM¥13¥10"
  269. !
  270. matchstr 11 42 "CONNECT 4800¥13¥10"
  271. matchstr 12 43 "CONNECT 4800/REL3¥13¥10"
  272. matchstr 13 43 "CONNECT 4800/REL4¥13¥10"
  273. matchstr 14 44 "CONNECT 4800/REL4-10¥13¥10"
  274. matchstr 15 45 "CONNECT 4800/LAPM¥13¥10"
  275. !
  276. matchstr 16 46 "CONNECT 7200¥13¥10"
  277. matchstr 17 47 "CONNECT 7200/REL3¥13¥10"
  278. matchstr 18 47 "CONNECT 7200/REL4¥13¥10"
  279. matchstr 19 48 "CONNECT 7200/REL4-10¥13¥10"
  280. matchstr 20 49 "CONNECT 7200/LAPM¥13¥10"
  281. !
  282. matchstr 21 50 "CONNECT 9600¥13¥10"
  283. matchstr 22 51 "CONNECT 9600/REL3¥13¥10"
  284. matchstr 23 51 "CONNECT 9600/REL4¥13¥10"
  285. matchstr 24 52 "CONNECT 9600/REL4-10¥13¥10"
  286. matchstr 25 53 "CONNECT 9600/LAPM¥13¥10"
  287. !
  288. matchstr 26 54 "CONNECT 12000¥13¥10"
  289. matchstr 27 55 "CONNECT 12000/REL3¥13¥10"
  290. matchstr 28 55 "CONNECT 12000/REL4¥13¥10"
  291. matchstr 29 56 "CONNECT 12000/REL4-10¥13¥10"
  292. matchstr 30 57 "CONNECT 12000/LAPM¥13¥10"
  293. !
  294. matchstr 31 58 "CONNECT 14400¥13¥10"
  295. matchstr 32 59 "CONNECT 14400/REL3¥13¥10"
  296. matchstr 33 59 "CONNECT 14400/REL4¥13¥10"
  297. matchstr 34 60 "CONNECT 14400/REL4-10¥13¥10"
  298. matchstr 35 61 "CONNECT 14400/LAPM¥13¥10"
  299. !
  300. ! other result codes.
  301. !
  302. matchstr 36 72 "RING¥13¥10"
  303. matchstr 37 82 "NO DIALTONE¥13¥10"
  304. matchstr 38 83 "NO CARRIER¥13¥10"
  305. matchstr 39 83 "ERROR¥13¥10"
  306. matchstr 40 84 "BUSY¥13¥10"
  307. matchstr 41 85 "NO ANSWER¥13¥10"
  308. matchstr 42 87 "CONNECT¥13¥10"
  309. matchstr 43 82 "HANDSET IN USE¥13¥10"
  310. !
  311. matchread 700
  312. ifANSWER 32
  313. jump 81
  314. !------------------------------------------------------------
  315. !  THIS v32b modem has been setup to do cts handshaking,
  316. !  and we assume that a cts handshaking cable is being used,
  317. !  so we leave the serial port set to 19,200 bps.
  318. !------------------------------------------------------------
  319. @LABEL 34
  320. note "1200bpsで接続確認中" 3
  321. CommunicatingAt 1200
  322. jump 68
  323. !
  324. @LABEL 35
  325. note "1200bps-MNPで接続確認中" 3
  326. CommunicatingAt 1200
  327. jump 68
  328. !
  329. @LABEL 36
  330. note "1200bps-MNP10で接続確認中" 3
  331. CommunicatingAt 1200
  332. jump 68
  333. !
  334. @LABEL 37
  335. note "1200bps-V.42で接続確認中" 3
  336. CommunicatingAt 1200
  337. jump 68
  338. !
  339. !
  340. !
  341. @LABEL 38
  342. note "2400bpsで接続確認中" 3
  343. CommunicatingAt 2400
  344. jump 68
  345. !
  346. @LABEL 39
  347. note "2400bps-MNPで接続確認中" 3
  348. CommunicatingAt 2400
  349. jump 68
  350. !
  351. @LABEL 40
  352. note "2400bps-MNP10で接続確認中" 3
  353. CommunicatingAt 2400
  354. jump 68
  355. !
  356. @LABEL 41
  357. note "2400bps-V.42で接続確認中" 3
  358. CommunicatingAt 2400
  359. jump 68
  360. !
  361. !
  362. !
  363. @LABEL 42
  364. note "4800bpsで接続確認中" 3
  365. CommunicatingAt 4800
  366. jump 68
  367. !
  368. @LABEL 43
  369. note "4800bps-MNPで接続確認中" 3
  370. CommunicatingAt 4800
  371. jump 68
  372. !
  373. @LABEL 44
  374. note "4800bps-MNP10で接続確認中" 3
  375. CommunicatingAt 4800
  376. jump 68
  377. !
  378. @LABEL 45
  379. note "4800bps-V.42で接続確認中" 3
  380. CommunicatingAt 4800
  381. jump 68
  382. !
  383. !
  384. !
  385. @LABEL 46
  386. note "7200bpsで接続確認中" 3
  387. CommunicatingAt 7200
  388. jump 68
  389. !
  390. @LABEL 47
  391. note "7200bps-MNPで接続確認中" 3
  392. CommunicatingAt 7200
  393. jump 68
  394. !
  395. @LABEL 48
  396. note "7200bps-MNP10で接続確認中" 3
  397. CommunicatingAt 7200
  398. jump 68
  399. !
  400. @LABEL 49
  401. note "7200bps-V.42で接続確認中" 3
  402. CommunicatingAt 7200
  403. jump 68
  404. !
  405. !
  406. !
  407. @LABEL 50
  408. note "9600bpsで接続確認中" 3
  409. CommunicatingAt 9600
  410. jump 68
  411. !
  412. @LABEL 51
  413. note "9600bps-MNPで接続確認中" 3
  414. CommunicatingAt 9600
  415. jump 68
  416. !
  417. @LABEL 52
  418. note "9600bps-MNP10で接続確認中" 3
  419. CommunicatingAt 9600
  420. jump 68
  421. !
  422. @LABEL 53
  423. note "9600bps-V.42で接続確認中" 3
  424. CommunicatingAt 9600
  425. jump 68
  426. !
  427. !
  428. !
  429. @LABEL 54
  430. note "12000bpsで接続確認中" 3
  431. CommunicatingAt 12000
  432. jump 68
  433. !
  434. @LABEL 55
  435. note "12000bps-MNPで接続確認中" 3
  436. CommunicatingAt 12000
  437. jump 68
  438. !
  439. @LABEL 56
  440. note "12000bps-MNP10で接続確認中" 3
  441. CommunicatingAt 12000
  442. jump 68
  443. !
  444. @LABEL 57
  445. note "12000bps-V.42で接続確認中" 3
  446. CommunicatingAt 12000
  447. jump 68
  448. !
  449. !
  450. !
  451. @LABEL 58
  452. note "14400bpsで接続確認中" 3
  453. CommunicatingAt 14400
  454. jump 68
  455. !
  456. @LABEL 59
  457. note "14400bps-MNPで接続確認中" 3
  458. CommunicatingAt 14400
  459. jump 68
  460. !
  461. @LABEL 60
  462. note "14400bps-MNP10で接続確認中" 3
  463. CommunicatingAt 14400
  464. jump 68
  465. !
  466. @LABEL 61
  467. note "14400bps-V.42で接続確認中" 3
  468. CommunicatingAt 14400
  469. jump 68
  470. !
  471. !
  472. !
  473. @LABEL 68
  474. ! turn on cts handshaking.
  475. HSReset 0 1 0 0 0 0
  476. !
  477. pause 15
  478. ifANSWER 69
  479. pause 30
  480. @LABEL 69
  481. exit 0
  482. !************************************************************
  483. ! @ANSWER
  484. ! Set the modem to answer on 1st ring - label range is 71-80
  485. !
  486. !************************************************************
  487. @LABEL 71
  488. matchclr
  489. matchstr 1 32 "OK¥13¥10"
  490. pause 2
  491. write "ATS0=2¥13"
  492. matchread 30
  493. inctries
  494. iftries 3 81
  495. jump 71
  496. !
  497. @LABEL 72
  498. ifORIGINATE 32
  499. ! claim the serial port
  500. userhook 1
  501. note "電話がかかってきました。" 2
  502. jump 32
  503. !************************************************
  504. ! error messages - label range is 81-100
  505. !
  506. !
  507. !************************************************
  508. ! Modem Not Responding
  509. @LABEL 81
  510. exit -6019
  511. !
  512. ! No Dial Tone
  513. @LABEL 82
  514. note "電話回線が接続されていない。または、0発信をしている場合はダイヤルトーン検出無視にして下さい" 3
  515. exit -6020
  516. !
  517. ! No Carrier or Error
  518. @LABEL 83
  519. exit -6021
  520. !
  521. ! Busy
  522. @LABEL 84
  523. exit -6022
  524. !
  525. ! No Answer
  526. @LABEL 85
  527. exit -6023
  528. !
  529. ! varstring invalid value
  530. @LABEL 86
  531. exit -6027
  532. !
  533. ! Connect 300bps
  534. @LABEL 87
  535. exit -6002 "ARA doesn't support 300bps connection."
  536. !
  537. !********************************************
  538. ! Hang up the modem - label range is 101-120
  539. !
  540. !
  541. !********************************************
  542. @HANGUP
  543. @LABEL 102
  544. settries 0
  545. HSReset 0 0 0 0 0 0
  546. !----------------------------
  547. ! firstly try escape sequence
  548. !----------------------------
  549. @LABEL 105
  550. serreset 19200, 0, 8, 1
  551. setspeed 14400
  552. matchclr
  553. matchstr 1 108 "OK¥13¥10"
  554. pause 10
  555. write "+++"
  556. matchread 15
  557. inctries
  558. iftries 3 108
  559. jump 105
  560. !-------------------
  561. ! secondly try ATH
  562. !-------------------
  563. @LABEL 108
  564. matchclr
  565. matchstr 1 111 "NO CARRIER¥13¥10"
  566. matchstr 2 111 "OK¥13¥10"
  567. matchstr 3 111 "ERROR¥13¥10"
  568. write "ATH¥13"
  569. matchread 30
  570. inctries
  571. iftries 3 110
  572. jump 108
  573. !---------------------------------------
  574. ! finaly try On-to-Off DTR transitions
  575. !---------------------------------------
  576. @LABEL 110
  577. DTRSet
  578. pause 5
  579. DTRClear
  580. pause 5
  581. DTRSet
  582. flush
  583. jump 111
  584. !------------------------------
  585. ! recall the factory settings.
  586. !------------------------------
  587. @LABEL 111
  588. serreset 19200, 0, 8, 1
  589. setspeed 14400
  590. pause 15
  591. matchclr
  592. matchstr 1 114 "OK¥13¥10"
  593. write "ATS0=0¥13"
  594. matchread 30
  595. jump 81
  596. !
  597. @LABEL 114
  598. exit 0
  599.  
  600. !*********************************************************
  601. ! labels 121-128 are reserved for future emergency hacks
  602. !
  603. !
  604. !*********************************************************